/*=========================================================================
*  Copyright 2009 NCS Pte. Ltd. All Rights Reserved
*
*  This software is confidential and proprietary to NCS Pte. Ltd. You shall
*  use this software only in accordance with the terms of the license
*  agreement you entered into with NCS.  No aspect or part or all of this
*  software may be reproduced, modified or disclosed without full and
*  direct written authorisation from NCS.
*
*  NCS SUPPLIES THIS SOFTWARE ON AN AS IS BASIS. NCS MAKES NO
*  REPRESENTATIONS OR WARRANTIES, EITHER EXPRESSLY OR IMPLIEDLY, ABOUT THE
*  SUITABILITY OR NON-INFRINGEMENT OF THE SOFTWARE. NCS SHALL NOT BE LIABLE
*  FOR ANY LOSSES OR DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
*  MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*
*  Change Revision
*  -------------------------------------------------------------------------
*  May 27, 2009  yunfeng   Description
*/
package canglang.scan.core.base.taglib.date;

import org.apache.struts2.components.TextField;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.opensymphony.xwork2.util.ValueStack;


public class DateField extends TextField {
    private String doNotDisplayFormat;

    public String getDoNotDisplayFormat() {
        return doNotDisplayFormat;
    }

    public void setDoNotDisplayFormat(String doNotDisplayFormat) {
        this.doNotDisplayFormat = doNotDisplayFormat;
    }

    public DateField(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
        super(stack, request, response);
    }

    protected void evaluateExtraParams() {
        super.evaluateExtraParams();
        if (doNotDisplayFormat != null) {
            addParameter("doNotDisplayFormat", findString(doNotDisplayFormat));
        }
    }
}
